﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CareableNews.ascx.cs" Inherits="GUI.Controls.News.CareableNews" %>
<div class="careable-news news-other pdt30 clearfix">
    <div class="clearfix">
        <span class="news-ohtertt">Có thể bạn quan tâm</span>
        <div class="nav-wrapper">
            <div class="btn-boxcare care-prev">
            </div>
            <div class="btn-boxcare care-next-blue">
            </div>
        </div>
    </div>
    <ul id="ul-care" class="clearfix">
        <asp:Literal ID="ltrBoxCare" runat="server"></asp:Literal>
    </ul>
</div>
<script type="text/javascript">
    $('#ul-care li div.item').each(function (i) {
        var self = this;
        if ( (i+1) % 3 == 0) {
            $(self).css("padding-right","0px").after('<div style="clear:both"></div>');
        }
    });

    $("#ul-care p").height(function () {
        var maxHeight = 0;
        $("#ul-care p").each(function () {
            if (maxHeight < $(this).height()) {
                maxHeight = $(this).height();
            }
        });
        return maxHeight;
    }).width(182);

    $(".careable-news").each(function () {
        $(this).find("li").addClass("mcgSlideItem");
        $(this).find("#ul-care").mcgSlider({
            preButton: $(this).find(".btn-boxcare:first"),
            nextButton: $(this).find(".btn-boxcare:not(:first)"),
            numberOfVisibleSlides: 1,
            duration:7000
        });

    });
</script>
